﻿using UnityEngine;
using System.Collections;
using System;
using System.Collections.Generic;

public class CharacterObj : ObjBase
{
    //m_gameObject
    public CharacterData characterData;
    //SkillCore

    public override void Init()
    {
        //最好把模型添加到场中中的统一一个父结点上
        //单一一个角色的创建
        //m_gameObject = GameObject.Instantiate(Resources.Load<GameObject>(characterData.ResPath));
        //m_gameObject.parent = root.transfrom;
    }

    public override void OnCreat()
    {
        //添加SkillCore
    }

    public void SetData(CharacterData character)
    {
        characterData = character;
    }

    public override void Release()
    {
        //root.transfrom; 下的形象全部删除
    }

    public void PlayAnim(int ID)
    {
        //如果需要播放技能
        //SkillCore.play();
    }

    public override void Update()
    {
       
        //播放期间设置标记防止反复播放动画
        //播完动画后
        //BattleFacade.Instance.PlayAnim(false);
    }

    internal void CreatHeroGrid(List<int> leftParticipationList)
    {
        for (int i = 0; i < leftParticipationList.Count; i++)
        {
            //最好把模型添加到场中中的统一一个父结点上
            //m_gameObject = GameObject.Instantiate(Resources.Load<GameObject>(characterData.ResPath));
            //m_gameObject.parent = root.transfrom;
        }
    }
}
